extends MultiplayerSynchronizer


@onready var player: Player = owner
@export var dir := Vector2.ZERO
var touch_vector: Vector2 = Vector2.ZERO



func _ready():
	set_process(is_multiplayer_authority())


func _process(_delta):
	dir = InputControl.get_vector(owner.device, "move_left", "move_right", "move_up", "move_down")
	if touch_vector.length(): dir = touch_vector
	
	if InputControl.just_pressed(owner.device, "fire") and player.fire_rate_timer.time_left == 0: player.make_fire()
